package com.qfedu.service;

import com.qfedu.dao.CommentDao;
import com.qfedu.entity.Comment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {

    @Autowired
    private CommentDao commentDao;

    @Override
    public List<Comment> getAllCommentOfSongList(int songListId) {
        return commentDao.getAllCommentOfSongList(songListId);
    }

    @Override
    public List<Comment> getAllCommentOfSong(int songId) {
        return commentDao.getAllCommentOfSong(songId);
    }

    @Override
    public boolean add(Comment comment) {
        return commentDao.add(comment);
    }

    @Override
    public boolean setLike(Comment comment) {
        return commentDao.setLike(comment);
    }

    @Override
    public boolean updateCommentMsg(Comment comment) {
        return commentDao.updateCommentMsg(comment);
    }

    @Override
    public boolean deleteComment(Comment comment) {
        return commentDao.deleteComment(comment);
    }
}
